import type { FormRules } from 'element-plus'

export interface IModelConfig {
  title: {
    addNewTitle: string
    editTitle: string
  }
  formItems: IFormItem[]
  rules?: FormRules
  labelWidth?: string
  labelPosition?: 'left' | 'right' | 'top'
  size?: 'large' | 'default' | 'small',
}

interface IFormItem extends IFormItemBase {
  related?:string,
  placeholder?: string
  initialValue?: any
  'range-separator'?: string
  'start-placeholder'?: string
  'end-placeholder'?: string
  options?: any
  slotName?: string
  hide?:boolean,
  tip?:string
}

interface IFormItemBase {
  type: 'input' | 'password' | 'select' | 'radio' | 'date-picker' | 'custom' | 'switch' | 'menu' | 'upload'
  prop: string
  label: string
}
interface IOptionItem {
  label: string
  value: string
}
